<template>
  <div>
    <BasicTable @register="registerTable"></BasicTable>
  </div>
</template>
<script lang="ts" setup name="hehuan">
import { BasicTable, useTable } from '@apps/antd-admin/src/components/Table';
import { page } from './api';
import { columns, searchFormSchema } from './data';
import { useMessage } from '@apps/antd-admin/src/hooks/web/useMessage';

const { createMessage } = useMessage();
const [registerTable, { reload }] = useTable({
  title: '列表',
  api: page,
  columns,
  formConfig: {
    labelWidth: 120,
    labelCol: { span: 5 },
    schemas: searchFormSchema,
  },
  useSearchForm: true,
  showTableSetting: true,
  bordered: true,
  showIndexColumn: true,
});

function handleSuccess() {
  reload();
}
</script>
